﻿/*******************************************************
* Autor: Oleg Rukin aka Keyki
********************************************************/

using System;
using System.IO;

namespace Keyki.WpfNefclas.Helpers
{
	public class Logger
	{
		private readonly StreamWriter _logWriter;

		public Logger(): this("log.txt")
		{}

		public Logger(string logger)
		{
			_logWriter = File.AppendText(logger);
		}//Logger

		public void WriteLine(string text)
		{
			_logWriter.WriteLine(text);
			_logWriter.Flush();
		}//WriteLines
		
		public void Close()
		{
			_logWriter.Close();
		}//Close

	}//class Logger
}//Keyki.WpfNefclas